import { createAPI } from '@/utils/request'

// 获取权限列表
export const list = (data) => createAPI('/permissions', 'get', data)
// 获取权限组名称
export const simple = (data) => createAPI('/permissions/simple', 'get', data)
// 添加权限组
export const add = (data) => createAPI('/permissions', 'post', data)
// 编辑权限组
export const update = (data) =>
  createAPI(`/permissions/${data.id}`, 'put', data)
//  删除用户
export const remove = (data) =>
  createAPI(`/permissions/${data.id}`, 'delete', data)
// 根据用户id获取权限组详情
export const detail = (data) =>
  createAPI(`/permissions/${data.id}`, 'get', data)
